package com.filetransfer.api.upload;
import lombok.AllArgsConstructor;
import lombok.Data;
@Data
@AllArgsConstructor
public class ProgressInfo {
    private final long totalBytesWritten;
    private final long totalContentLength;
    private final long chunkCount;
    private final int currentChunkIndex;
    private final long currentChunkBytesWritten;
    private final long currentChunkContentLength;
    public int getProgressPercentage() {
        var percent = (int) ((this.getTotalBytesWritten() * 100) / this.getTotalContentLength());
        return percent;
    }
}
